<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<html>
<head>
<title>My Application</title>
<link rel="STYLESHEET" type="text/css" href="dhtml/dhtmlx.css">
<link rel="STYLESHEET" type="text/css" href="dhtml/skins/dhtmlxgrid_dhx_skyblue.css">

<script src="dhtml/dhtmlx.js" type="text/javascript"></script>
<<<<<<< .mine

=======
<script src="dhtml/dhtmlxgrid_pgn.js" type="text/javascript"></script>
>>>>>>> .r21
<script src="jquery-1.6.2.min.js"></script> 
<script src="dhtml/dhtmlxgrid_pgn.js" type="text/javascript"></script>
</head>
<body>
<table width="500px" id="paging_container">
   <tr>
      <td id="recinfoArea"></td>
   </tr>
   <tr>
      <td>
         <div id="gridbox" style="widht:100%; height:150px; background-color:white;overflow:hidden"></div>
      </td>
   </tr>
   <tr>
      <td id="pagingArea"></td>
   </tr>
</table>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("dhtml/imgs/");
mygrid.setHeader("Author,Title,1");
mygrid.setInitWidths("150,150");
mygrid.setColAlign("left,left");
mygrid.enablePaging(true,1,1,pagingArea,false,recinfoArea);
mygrid.setColSorting("str,str");
mygrid.setPagingSkin("toolbar");
 //mygrid.setPagingSkin("toolbar");
// mygrid.setPagingSkin("toolbar","dhx_black");
 
mygrid.init();
mygrid.enablePaging(true,5);
mygrid.load("/simpleJupiter/rest/report_jqdzfhxmgh/?type=findbysql&sql=select%20*%20from%20users","json");



function ocl1(){


$.getJSON("/simpleJupiter/rest/report_jqdzfhxmgh/",{"type":"findbysql","sql":document.getElementById("textA1").value}, function(json) { 
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("dhtml/imgs/");
mygrid.setHeader(json.columns);
mygrid.setSkin("dhx_skyblue");
mygrid.init();
mygrid.parse(json,"json");
 });
};
</script>
<textarea rows="2" name="S1" cols="20" id="textA1"></textarea>
<button onclick="ocl1()">execute</button>
</body>
</html>